package com.kdx.cloud.common.tools;

import java.util.List;

import com.github.pagehelper.PageInfo;

/**
 * @author litianshen
 * @param <T>
 * @date 2017年1月22日 下午5:27:17
 * @Description:
 */
public class Result4AngularPageing<T> extends Result4Angular<T> {

	private long pageNo;// 当前页

	private long pageSize;// 每页条数

	private long total;// 总条数

	private long pages;// 总页面数目

	/**
	 * @param results
	 */
	public Result4AngularPageing(List<T> results) {
		super(results);
		PageInfo<T> pageInfo = new PageInfo<T>(results);
		this.pageNo = pageInfo.getPageNum();
		this.pageSize = pageInfo.getPageSize();
		this.total = pageInfo.getTotal();
		this.pages = pageInfo.getPages();
	}

	public long getPageNo() {
		return pageNo;
	}

	public void setPageNo(long pageNo) {
		this.pageNo = pageNo;
	}

	public long getPageSize() {
		return pageSize;
	}

	public void setPageSize(long pageSize) {
		this.pageSize = pageSize;
	}

	public long getTotal() {
		return total;
	}

	public void setTotal(long total) {
		this.total = total;
	}

	public long getPages() {
		return pages;
	}

	public void setPages(long pages) {
		this.pages = pages;
	}

}
